//
//  PlanRunCell.m
//  DefendHealth
//
//  Created by 吾诺瀚卓 on 17/3/7.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "PlanRunCell.h"

@implementation PlanRunCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
    
        
        UIImageView *bgImageView = [ReduceCode creatImageVeiwWithFrame:CGRectMake(0, 0, kScreenWidth, 175) imageName:@"img1" isCorner:NO];
        [self.contentView addSubview:bgImageView];
        
        UIImageView *typeImgV = [ReduceCode creatImageVeiwWithFrame:CGRectMake(0, 0, 80, 30) imageName:@"block" isCorner:NO];
        [self.contentView addSubview:typeImgV ];
        
        UILabel *titL = [ReduceCode creatLabelWithFrame:CGRectMake(0, 0, 80, 30) title:@"强化心肺" titleColor:kWhiteColor font:14 textAlignment:NSTextAlignmentCenter];
        [typeImgV addSubview:titL];
        
        UILabel *titNameL = [ReduceCode creatLabelWithFrame:CGRectMake(20, 100, 130, 30) title:@"20天燃脂瘦身跑" titleColor:UIColorFromRGB(0xffffff) font:17 textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:titNameL];
        
        UILabel *nanDuL = [ReduceCode creatLabelWithFrame:CGRectMake(20, kMaxY(titNameL.frame)+5, 30, 20) title:@"难度" titleColor:UIColorFromRGB(0xffffff) font:14 textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:nanDuL];
        
//        UIImageView *img = [ReduceCode creatImageVeiwWithFrame:CGRectMake(kMaxX(nanDuL.frame)+1, kMaxY(titNameL.frame)+5, 100, 20) imageName:@"yellow3" isCorner:NO];
//        [self.contentView addSubview:img];
        UIImageView *image = nil;
        for (int i = 0; i<5; i++) {
            image = [ReduceCode creatImageVeiwWithFrame:CGRectMake(kMaxX(nanDuL.frame)+i*(20+1), kMaxY(titNameL.frame)+7, 15, 15) imageName:@"diffcult_grey" isCorner:NO];
            [self.contentView addSubview:image];
        }
        for (int i = 0; i<3; i++) {
            UIImageView *images = [ReduceCode creatImageVeiwWithFrame:CGRectMake(kMaxX(nanDuL.frame)+i*(20+1), kMaxY(titNameL.frame)+7, 15, 15) imageName:@"diffcult" isCorner:NO];
            [self.contentView addSubview:images];
        }
        
        UILabel *numL = [ReduceCode creatLabelWithFrame:CGRectMake(kMaxX(image.frame)+1, kMaxY(titNameL.frame)+5, 120, 20) title:@"| 10000人已经参加" titleColor:UIColorFromRGB(0xffffff) font:14 textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:numL];
        
        [ToolUtil createLine:kMaxY(nanDuL.frame)+18 superView:self.contentView lift:0 width:kScreenWidth hight:2 color:k_TableBackColor];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
